package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_sex database table.
 * 
 */
@Entity
@Table(name="per_pms_sex")
@NamedQuery(name="PerPmsSex.findAll", query="SELECT p FROM PerPmsSex p")
public class PerPmsSex implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int sexid;

	private String sex;

	//bi-directional many-to-one association to PerPmsEmpdet
	@OneToMany(mappedBy="perPmsSex")
	private List<PerPmsEmpdet> perPmsEmpdets;

	//bi-directional many-to-one association to PerRetRse
	@OneToMany(mappedBy="perPmsSex")
	private List<PerRetRse> perRetRses;

	public PerPmsSex() {
	}

	public int getSexid() {
		return this.sexid;
	}

	public void setSexid(int sexid) {
		this.sexid = sexid;
	}

	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public List<PerPmsEmpdet> getPerPmsEmpdets() {
		return this.perPmsEmpdets;
	}

	public void setPerPmsEmpdets(List<PerPmsEmpdet> perPmsEmpdets) {
		this.perPmsEmpdets = perPmsEmpdets;
	}

	public PerPmsEmpdet addPerPmsEmpdet(PerPmsEmpdet perPmsEmpdet) {
		getPerPmsEmpdets().add(perPmsEmpdet);
		perPmsEmpdet.setPerPmsSex(this);

		return perPmsEmpdet;
	}

	public PerPmsEmpdet removePerPmsEmpdet(PerPmsEmpdet perPmsEmpdet) {
		getPerPmsEmpdets().remove(perPmsEmpdet);
		perPmsEmpdet.setPerPmsSex(null);

		return perPmsEmpdet;
	}

	public List<PerRetRse> getPerRetRses() {
		return this.perRetRses;
	}

	public void setPerRetRses(List<PerRetRse> perRetRses) {
		this.perRetRses = perRetRses;
	}

	public PerRetRse addPerRetRs(PerRetRse perRetRs) {
		getPerRetRses().add(perRetRs);
		perRetRs.setPerPmsSex(this);

		return perRetRs;
	}

	public PerRetRse removePerRetRs(PerRetRse perRetRs) {
		getPerRetRses().remove(perRetRs);
		perRetRs.setPerPmsSex(null);

		return perRetRs;
	}

}